package com.aiti.lulian.service.impl;

import com.aiti.base.core.utils.message.Message;
import com.aiti.lulian.dto.ShowActivityInfoEnrollDto;
import com.aiti.lulian.dto.ShowActivityInfoEnrollExportDto;
import com.aiti.lulian.entity.ShowActivityInfo;
import com.aiti.lulian.entity.ShowActivityInfoEnroll;
import com.aiti.lulian.mapper.ShowActivityInfoEnrollMapper;
import com.aiti.lulian.service.ShowActivityInfoEnrollService;
import com.aiti.lulian.vo.ShowActivityInfoEnrollVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * <p>
 * 活动报名 服务实现类
 * </p>
 *
 * @author 
 * @since 2025-06-11
 */
@Service
public class ShowActivityInfoEnrollServiceImpl extends ServiceImpl<ShowActivityInfoEnrollMapper, ShowActivityInfoEnroll> implements ShowActivityInfoEnrollService {



    @Override
    public List<ShowActivityInfoEnrollVo> listActivityEnroll(Page page, ShowActivityInfoEnrollDto dto) {
        List<ShowActivityInfoEnrollVo> showActivityInfoEnrollVos = this.getBaseMapper().listActivityEnroll(page, dto);
        return showActivityInfoEnrollVos;
    }

    @Override
    public ShowActivityInfoEnroll getActivityEnrollById(String id) {
        return this.getById(id);
    }

    @Override
    public Message saveActivityEnroll(ShowActivityInfoEnroll entity) {
        this.save(entity);
        return Message.success();
    }

    @Override
    public Message updateActivityEnroll(ShowActivityInfoEnroll entity) {
        this.updateById(entity);
        return Message.success();
    }

    @Override
    public Message deleteActivityEnroll(String id) {
        this.removeById(id);
        return Message.success();
    }

    @Override
    public List<ShowActivityInfoEnrollExportDto> listActivityEnrollForExport(Page page, ShowActivityInfoEnrollDto dto) {
        List<ShowActivityInfoEnrollExportDto> list = this.getBaseMapper().listActivityEnrollForExport(page, dto);
        return list;
    }
}
